<html>

<head>
<title>Running Scripts</title>
<meta content="Running scripts,Debugging" name="keywords">
</head>

<body bgcolor="#FFFCEA">

<table bgcolor="#C0C0C0" border="0" cellpadding="2" cellspacing="0" width="100%">
	<tr>
		<td align="left">
		<div align="left">
			<font color="#010101" face="Arial" size="4">
			<span style="font-size: 14pt; font-family: Arial; color: #010101">Running 
			Scripts</span></font></div>
		</td>
		<td align="right"><font face="Arial" size="2">
		<a href="remotepythonengines.htm">Previous</a>&nbsp;<a href="pyscripter.htm">Top</a>&nbsp;<a href="runconfigurations.htm">Next</a>
		</font></td>
	</tr>
</table>
<hr>
<div align="left">
	<font face="Arial" size="2">
	<span style="font-size: 10pt; font-family: Arial; color: #000000">There are 
	many ways of running Python scripts from PyScripter:</span></font></div>
<div align="left">
	<font face="Arial" size="2">
	<span style="font-size: 10pt; font-family: Arial; color: #000000"><br>
	</span></font></div>
<div align="left" style="margin-left: 6mm; margin-right: 0mm; text-indent: -6mm; margin-top: 0.00mm; margin-bottom: 0.00mm;">
	<font color="#010101" face="Symbol" size="2">
	<span style="font-size: 10pt; font-family: Symbol; color: #010101">&middot;</span></font><font color="#010101" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: #010101">&nbsp;&nbsp; &nbsp;&nbsp;</span></font><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: #000000"><b>Debug 
	using the internal integrated Python debugger (depricated)</b></span></font></div>
<div align="left">
	<font face="Arial" size="2">
	<span style="font-size: 10pt; font-family: Arial; color: #000000">Set any breakpoints 
	you need and then from the </span></font><a href="runmenu.htm">
	<font color="#0000ff" face="Arial" size="2">
	<span style="font-size: 10pt; font-family: Arial; color: #0000ff"><u>Run menu</u></span></font></a><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: #000000"> 
	select the Debug command.&nbsp; All the debugging facilities (step-into, step-out 
	etc.) are available in this case.&nbsp; When the execution stops at a breakpoint 
	or while stepping through the code you can use the </span></font>
	<a href="callstackwindow.htm"><font color="#0000ff" face="Arial" size="2">
	<span style="font-size: 10pt; font-family: Arial; color: #0000ff"><u>Call Stack 
	window</u></span></font></a><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: #000000">, 
	the </span></font><a href="variableswindow.htm">
	<font color="#0000ff" face="Arial" size="2">
	<span style="font-size: 10pt; font-family: Arial; color: #0000ff"><u>Variables 
	window</u></span></font></a><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: #000000"> 
	and the </span></font><a href="watcheswindow.htm">
	<font color="#0000ff" face="Arial" size="2">
	<span style="font-size: 10pt; font-family: Arial; color: #0000ff"><u>Watches 
	window</u></span></font></a><font color="#010101" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: #010101"> 
	to better understand the behavior of your code.&nbsp; All output is redirected 
	to the </span></font><a href="pythoninteractiveinterpreter.htm">
	<font color="#0000ff" face="Arial" size="2">
	<span style="font-size: 10pt; font-family: Arial; color: #0000ff"><u>Interpreter 
	window</u></span></font></a><font color="#010101" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: #010101">.&nbsp; 
	You can also use the Interpreter Window while debugging for running Python code 
	in the context of the Call Stack frame at which the execution stopped for example 
	if you want to change the value of a variable.</span></font></div>
<div align="left">
	<font color="#010101" face="Arial" size="2">
	<span style="font-size: 10pt; font-family: Arial; color: #010101"><br>
	</span></font></div>
<div align="left">
	<font color="#010101" face="Arial" size="2">
	<span style="font-size: 10pt; font-family: Arial; color: #010101">You can also 
	start debugging by using the &quot;Step-Into&quot; and the &quot;Run to Cursor&quot; 
	commands of of the Run menu.&nbsp; In that case executions stops at the first 
	executable statement or the current line of the active module.</span></font></div>
<div align="left">
	<font face="Arial" size="2">
	<span style="font-size: 10pt; font-family: Arial; color: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></font></div>
<div align="left" style="margin-left: 6mm; margin-right: 0mm; text-indent: -6mm; margin-top: 0.00mm; margin-bottom: 0.00mm;">
	<font color="#010101" face="Symbol" size="2">
	<span style="font-size: 10pt; font-family: Symbol; color: #010101">&middot;</span></font><font color="#010101" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: #010101">&nbsp;&nbsp; &nbsp;&nbsp;</span></font><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: #000000"><b>Run 
	without debugging using the internal Python interpreter (depricated)</b></span></font></div>
<div align="left">
	<font face="Arial" size="2">
	<span style="font-size: 10pt; font-family: Arial; color: #000000">Select the 
	Run command </span></font><font color="#010101" face="Arial" size="2">
	<span style="font-size: 10pt; font-family: Arial; color: #010101">from the
	</span></font><a href="runmenu.htm">
	<font color="#0000ff" face="Arial" size="2">
	<span style="font-size: 10pt; font-family: Arial; color: #0000ff"><u>Run menu</u></span></font></a><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: #000000">.&nbsp; 
	All output is again redirected to the </span></font>
	<a href="pythoninteractiveinterpreter.htm">
	<font color="#0000ff" face="Arial" size="2">
	<span style="font-size: 10pt; font-family: Arial; color: #0000ff"><u>Interpreter 
	Window</u></span></font></a><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: #000000">.</span></font></div>
<div align="left">
	<font face="Arial" size="2">
	<span style="font-size: 10pt; font-family: Arial; color: #000000"><br>
	</span></font></div>
<div align="left" style="margin-left: 6mm; margin-right: 0mm; text-indent: -6mm; margin-top: 0.00mm; margin-bottom: 0.00mm;">
	<font color="#010101" face="Symbol" size="2">
	<span style="font-size: 10pt; font-family: Symbol; color: #010101">&middot;</span></font><font color="#010101" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: #010101">&nbsp;&nbsp; &nbsp;&nbsp;</span></font><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: #000000"><b>Run 
	or debug using one of the remote Python engines</b></span></font></div>
<div align="left">
	<font face="Arial" size="2">
	<span style="font-size: 10pt; font-family: Arial; color: #000000">Select an 
	appropriate remote Python engine from the Python Engine submenu of the
	</span></font><a href="runmenu.htm">
	<font color="#0000ff" face="Arial" size="2">
	<span style="font-size: 10pt; font-family: Arial; color: #0000ff"><u>Run menu</u></span></font></a><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: #000000">.&nbsp;
	</span></font></div>
<div align="left">
	<font face="Arial" size="2">
	<span style="font-size: 10pt; font-family: Arial; color: #000000">Then run or 
	debug as when using the internal Python engine.&nbsp; See the </span></font>
	<a href="remotepythonengines.htm">
	<font color="#0000ff" face="Arial" size="2">
	<span style="font-size: 10pt; font-family: Arial; color: #0000ff"><u>Remote 
	Python Engine</u></span></font></a><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: #000000"> 
	topic for details.</span></font></div>
<div align="left">
	<font face="Arial" size="2">
	<span style="font-size: 10pt; font-family: Arial; color: #000000"><br>
	</span></font></div>
<div align="left" style="margin-left: 6mm; margin-right: 0mm; text-indent: -6mm; margin-top: 0.00mm; margin-bottom: 0.00mm;">
	<font color="#010101" face="Symbol" size="2">
	<span style="font-size: 10pt; font-family: Symbol; color: #010101">&middot;</span></font><font color="#010101" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: #010101">&nbsp;&nbsp; &nbsp;&nbsp;</span></font><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: #000000"><b>Run 
	externally from PyScripter</b></span></font></div>
<div align="left">
	<font color="#010101" face="Arial" size="2">
	<span style="font-size: 10pt; font-family: Arial; color: #010101">Select the 
	External Run command from the </span></font><a href="runmenu.htm">
	<font color="#0000ff" face="Arial" size="2">
	<span style="font-size: 10pt; font-family: Arial; color: #0000ff"><u>Run menu</u></span></font></a><font color="#010101" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: #010101">.&nbsp; 
	Extensive customization (choice of interpreter, command-line, environment variables 
	etc.) is available through the Configure External Run command.&nbsp; The various 
	settings are the same as in the </span></font><a href="externaltools.htm">
	<font color="#0000ff" face="Arial" size="2">
	<span style="font-size: 10pt; font-family: Arial; color: #0000ff"><u>External 
	Tools</u></span></font></a><font color="#010101" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: #010101"> 
	configuration.&nbsp; By default output is captured and shown at the </span>
	</font><a href="outputwindow.htm">
	<font color="#0000ff" face="Arial" size="2">
	<span style="font-size: 10pt; font-family: Arial; color: #0000ff"><u>Output 
	window</u></span></font></a><font color="#010101" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: #010101">.</span></font></div>
<div align="left">
	<font face="Arial" size="2">
	<span style="font-size: 10pt; font-family: Arial; color: #000000"><br>
	</span></font></div>
<div align="left">
	<font face="Arial" size="2">
	<span style="font-size: 10pt; font-family: Arial; color: #000000">For the first 
	two cases you can set command line parameter using the </span></font>
	<a href="commandline.htm"><font color="#0000ff" face="Arial" size="2">
	<span style="font-size: 10pt; font-family: Arial; color: #0000ff"><u>Command 
	Line</u></span></font></a><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: #000000"> 
	command.&nbsp; </span></font></div>
<div align="left">
	<font face="Arial" size="2">
	<span style="font-size: 10pt; font-family: Arial; color: #000000"><br>
	</span></font></div>
<div align="left">
	<font face="Arial" size="2">
	<span style="font-size: 10pt; font-family: Arial; color: #000000">In addition, 
	using the </span></font><a href="theprojectexplorer.htm">
	<font color="#0000ff" face="Arial" size="2">
	<span style="font-size: 10pt; font-family: Arial; color: #0000ff"><u>Project 
	Explorer</u></span></font></a><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: #000000">, 
	you can create multiple </span></font><a href="runconfigurations.htm">
	<font color="#0000ff" face="Arial" size="2">
	<span style="font-size: 10pt; font-family: Arial; color: #0000ff"><u>Run Configurations</u></span></font></a><font color="#010101" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: #010101"> 
	with some more advanced options.</span></font></div>
<div align="left">
&nbsp;&nbsp;</div>

</body>

</html>
